import 'package:flutter/material.dart';
import '../model/categoryGoodsList.dart';

class CategoryGoodsListProvider with ChangeNotifier {
  List<CategoryListData> _goodsList = [];

  List<CategoryListData> get list => _goodsList;

  void changeCategoryGoodsList(List<CategoryListData> list, {bool add}) {
    if(add == null || !add) {
      _goodsList = list;
    } else {
      _goodsList.addAll(list);
    }
    notifyListeners();
  }
}